package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class Test3 {
    public static void main(String[] args) throws IOException {
        File dir = new File("./src/main/java/io");
        File[] subs = dir.listFiles(f->f.getName().endsWith(".java"));
        for (File sub : subs){
            FileInputStream fis = new FileInputStream(sub);
            long len = sub.length();
            byte[] data = new byte[(int) len];
            fis.read(data);
            String line = new String(data,StandardCharsets.UTF_8);
            System.out.println(line);
            fis.close();
        }
    }
}
